﻿using System;
using System.IO;

namespace Kotonoha.Server.Utils {
    
    public class PathUtil {
        public static readonly string USER_DATA_DIR = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Kotonoha");
        public static readonly string DICT_DIR = Path.Combine(USER_DATA_DIR, "Dictionaries");
        public static readonly string SETTINGS_DIR = Path.Combine(USER_DATA_DIR, "Settings");
        public static readonly string DB_PATH_OLD = Path.Combine(USER_DATA_DIR, "db.xml");
        public static readonly string DB_PATH = Path.Combine(USER_DATA_DIR, "kotonoha.db");
        
        public static readonly string LOG_CONFIG_PATH = Path.Combine(SETTINGS_DIR, "config.log4net");

        public static string GetDictPath(string rest) {
            return Path.Combine(DICT_DIR, rest);
        }

        public static string GetSettingsPath(string name) {
            return Path.Combine(SETTINGS_DIR, name);
        }
    }
}
